<?php
/**
 * Created by PhpStorm.
 * User: Lenovo
 * Date: 2020/7/18
 * Time: 20:52
 */

namespace app\api\service;


class Token
{
    public static function generateToken(){
        $randChars=getRandChars(32);
        //用三组字符串，进行MD5加密
        $timestamp=$_SERVER['REQUEST_TIME'];
        //salt 盐
        $salt=config('secure.token_salt');
        return md5($randChars.$timestamp.$salt);
    }
}